package hpu.e4_demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import hpu.e4_demo.entity.TUserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author FFF
 * @since 2025-06-21
 */
@Mapper
public interface TUserInfoMapper extends BaseMapper<TUserInfo> {
    @Select("select * from t_user_info ")
    IPage<TUserInfo> findAll(IPage<TUserInfo> page);


    List<TUserInfo> getById(String userName, String userTureName, String userPhoneNumber);

    @Update("update t_user_info set password = #{newPassword} ,modify_time = current_timestamp where user_name = #{userName} ")
    Integer update(String userName, String newPassword);
}
